6538472ea0342949e32036e1e7c446639e3ed613,findbugs/src/java/edu/umd/cs/findbugs/visitclass/PreorderVisitor.java,PreorderVisitor,getSizeOfSurroundingCatchBlock,#number#,102
Before Change
if (code == null) throw new IllegalStateException("Not visiting Code");
int size = Integer.MAX_VALUE;
for (CodeException catchBlock : code.getExceptionTable()) {
if (pc >= catchBlock.getStartPC() && pc <= catchBlock.getEndPC()) {
int thisSize = catchBlock.getEndPC() - catchBlock.getStartPC();
if (size > thisSize)
size = thisSize;
After Change
int tightEndPC = Integer.MAX_VALUE;
if (code.getExceptionTable() == null) return size;
for (CodeException catchBlock : code.getExceptionTable()) {
int startPC = catchBlock.getStartPC();
int endPC = catchBlock.getEndPC();
if (pc >= startPC && pc <= endPC) {
int thisSize = endPC - startPC;
if (size > thisSize) {
size = thisSize;
tightStartPC = startPC;
tightEndPC = endPC;
}
}
}
if (size < Integer.MAX_VALUE) {
if (code.getLineNumberTable() == null) return size;
int firstLineNumber = code.getLineNumberTable().getSourceLine(tightStartPC);
int lastLineNumber = code.getLineNumberTable().getSourceLine(tightEndPC);